home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / C-H / CHexDmpDA.cpt / Hex Dump DA / stdfile.HexDumpDA.c < prev    next >
C/C++ Source or Header  |  1988-06-15  |  723b  |  39 lines

  1. #include <DialogMgr.h>
  2. #include <EventMgr.h>
  3. #include <StdFilePkg.h>
  4. #include <SetUpA4.h>
  5.  
  6. #include "HexDump.h"
  7.  
  8. SFReply reply;
  9.  
  10. static    Point    where = { 100, 104 };
  11. static    Boolean    optionDown;
  12.  
  13. pascal Boolean Look_For_Option(theDialog, theEvent, itemHit)
  14. DialogPtr     theDialog;
  15. EventRecord *theEvent;
  16. int            *itemHit;
  17. {
  18.     SetUpA4();
  19.     if (theEvent->what==mouseDown)
  20.         optionDown = ((theEvent->modifiers & optionKey)!=0);
  21.     RestoreA4();
  22.     return false;
  23. }
  24.  
  25. oldfilename( option )
  26. enum fork *option;
  27. {
  28.     SFReply locReply;
  29.     
  30.     RememberA4();
  31.     SFPGetFile(where, "\popen file:", 0L, -1, 0L, 0L, &locReply, 
  32.         -4000, Look_For_Option );
  33.     if (!locReply.good)
  34.         return 0;
  35.     *option = optionDown ? resource : data;
  36.     reply = locReply;
  37.     return 1;
  38. }
  39.